﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNCMedia.KQXS.DataAccess.DAL;
using ThanhTu.GNCMedia.KQXS.DataAccess.DO;

namespace ThanhTu.GNCMedia.KQXS.DataAccess.BL
{
    public class RegionBL : IDisposable
    {
        private RegionDAL vRegionDAL = null;
        private bool disposed = false;
        public RegionBL()
        {
            if (vRegionDAL == null)
            {
                vRegionDAL = new RegionDAL();
            }
        }
        ~RegionBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vRegionDAL != null)
                    {
                        vRegionDAL.Dispose();
                        vRegionDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion

        public int add(RegionD0 vRegionD0) { return vRegionDAL.add(vRegionD0); }
        public RegionD0 getbyRegion(string ID_region) { return vRegionDAL.getbyRegion(ID_region); }
        public List<RegionD0> SelectALL() { return vRegionDAL.SelectALL(); }
        public int delete(string ID_region) { return vRegionDAL.delete(ID_region); }
    }
}
